home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wayzata's Best of Shareware PC/Windows 2
/
Wayzata's Best of Shareware 2.0 (Windows) (Wayzata Technology)(7112)(1994).bin
/
pc
/
dos
/
cad_cam
/
a7221v1b
/
send7221.doc
< prev
next >
Wrap
Text File
|
1992-03-17
|
19KB
|
469 lines
SEND7221
Version 1.0b
University of Rochester
Psychology Department
March, 1992
Sections in this document:
DISCLAIMER
TRADEMARKS
INTRODUCTION
AUTHENTICITY
COPYING
COMPILING
SYSTEM REQUIREMENTS
USAGE
ERROR AND WARNING MESSAGES
PLOTTER ERROR LIGHTS
BUGS
----------------------------------DISCLAIMER---------------------------------
This software is distributed free of charge. As such, it comes with
ABSOLUTELY NO WARRANTY. The user of the software assumes ALL RISKS
associated with its use.
Please read the COPYING section of this document to determine your rights
to copy and/or modify this software.
---------------------------------INTRODUCTION--------------------------------
The SEND7221 program is a companion to the ADI7221 program, and is used
to send the output from ADI7221 through a serial connection to an HP
7221 plotter. The SEND7221 program handles buffer control and other
minor device control instructions.
SEND7221 has several command line options, all of which control the way
the serial port is configured. These options are discussed in the USAGE
section of this document.
This program may be useful for sending 7221 code produced by other
programs, but may not operate correctly if the code contains anything
other than graphics instructions. In particular, code that includes
plotter on or plotter off instructions, or changes the handshake mode
will probably not work.
----------------------------------TRADEMARKS---------------------------------
IBM is a registered trademark of International Business Machines.
AutoCAD and ADI are registered trademarks of Autodesk, Inc.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Corp.
Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
---------------------------------AUTHENTICITY--------------------------------
To ensure that your copy of SEND7221 is virus free, it is recommened that
you obtain a copy of the VALIDATE program. This program is free, and is
part of the McAffee Associates virus protection package (the rest of the
package is shareware). McAffee associates can be contacted at
(408) 988-3832.
The Size reported for SEND7221.EXE and the Hex numbers associated with
"Check Method 1" and "Check Method 2" should match the output from the
following run of VALIDATE version 0.3:
File Name: SEND7221.EXE
Size: 12,581
Date: 3-16-1992
File Authentication:
Check Method 1 - DD80
Check Method 2 - 001F
-----------------------------------COPYING-----------------------------------
You may copy and redistribute this software and its source code in its
unaltered state, provided that each copy is labeled with the original
copyright and disclaimer of warranty notices. Recipients of distributed
copies of this software must also be given the rights outlined here. No
fee may be charged for copies beyond nominal copying and media costs.
You may modify your copy of the source code, and may distribute the
modified versions under the following conditions:
All modified files must be clearly labeled as modified versions, such
labels must include the authors name, the date, and the nature of all
changes.
Any program that contains the source code from this software, in whole
or in part, must be licensed free of charge, under the same conditions
as those outlined in this document. The one exception being that you
can provide a warranty for your program if you choose.
A reasonable attempt must be made to notify the orignal author of this
software prior to distribution of modified versions. Such notification
should include the nature of all changes made to the software.
The original author can be contacted at the following address:
Dave Lutz
Psychology/Meliora Hall
Univeristy of Rochester
Rochester, NY 14627
Electronic mail may be sent to one of the following addresses:
Internet: lutz@psych.rochester.edu
or
lutz@prodigal.psych.rochester.edu
BITNET: lutz@uordbv
Bug reports can also be sent to any of the addresses listed above.
----------------------------------COMPILING----------------------------------
The source code for SEND7221.EXE has been included so that you may
compile it yourself if you wish. The code is written in C, and was tested
using Microsoft C 5.1. A Makefile for that compiler has been included in
the distribution. If you do not have MSC 5.1, you may have to create your
own Makefile.
The source for SEND7221.EXE contains code that may be compiler dependant,
and is definitely CPU dependant. (sorry folks, serial I/O on a PC is a
royal pain) I have tried to isolate the compiler/CPU specific code within
one module (COMIO.C). This module will probably have to be modified if
you use anything other than Microsoft C 5.1 on an IBM compatible PC.
The following discussion assumes that the files in the distribution were
installed as follows:
/ADI - .DOC files and precompiled .EXE files
/ADI/ADI7221 - source for ADI7221.EXE
/ADI/SEND7221 - source for SEND7221.EXE
It is critical that you DO NOT COMBINE the source code for ADI7221 and
SEND7221 in the same directory. The two programs have modules/files by
the same names that have different contents.
Before you begin compilation, CD to /ADI/SEND7221. Next, look at the
definitions in MAKEFILE.MSC and modify them for your local site.
Assuming you have MSC 5.1, you should type "make makefile.msc". The code
should compile with no errors, except that you will get the normal "Warning
target does not exist" message for each module as it is compiled.
As it is currently defined, the makefile will first produce an executable
called SEND7221.EXE in the SEND7221 directory. This executable is then
packed via Microsoft's EXEPACK command, producing the final SEND7221.EXE
in /ADI.
Once the final exeutable is in place, you can delete all of the .OBJ files
and the intermediate SEND7221.EXE file from /ADI/SEND7221.
-----------------------------SYSTEM REQUIREMENTS-----------------------------
SEND7221 should run correctly on any IBM compatible PC that has at least
50k of free memory, a serial port, and (of course) and HP 7221 plotter.
The plotter should be connected to the computer via a NULL modem cable.
The default settings for SEND7221 assume that the plotter is connected to
COM1, and has been set for 2400 baud, parity enabled, even parity.
There is no limit to the size of the input file, and the memory
requirements of the program do not change with the its size.
------------------------------------USAGE------------------------------------
The command line for the SEND7221 program can be quite simple, and
consists of the following when default settings are used:
SEND7221 infile.hpp
The file infile.hpp is a file containing HP 7221 plotter codes which were
produced by the ADI7221 program. The codes are assumed to contain graphic
instructions that the plotter will use to plot a drawing.
The above command assumes that the plotter is connected to COM1, at
2400 baud, parity enabled, even parity.
There are several command line options which can be used to set various
parameters for serial port configuration. The complete synopsis for the
command is as follows:
SEND7221 [/C:?] [/D:?] [/S:?] [/P:?] [/B:????] infile.hpp
/C:? = Com port number (1-4) Default=1
Use /C if you have the plotter connected to a serial port other
than COM1 (ie COM2 = /C:2).
/D:? = Number of data bits (7/8/D) Default=7
Use /D to specify the number of data bits. This is only necessary
if you disable parity checking on the plotter. In that case, you
can use /D:8.
/S:? = Number of stop bits (1/2) Default=1
Specify the number of stop bits. There is no need for this option
unless the program is modified to support baud rates of 75 or 110
baud. If that is the case, and you choose to use 75 or 110 baud,
you should also use /S:2.
/P:? = Parity (E/O/N/D) Default=E
Set parity to even, odd, none, or don't care. If you disable parity
checking on the plotter, you can use /P:N or /P:D.
/B:???? = Baud rate (300/1200/2400) Default=2400
Set the baud rate. Use this if you decide to use a buad rate lower
than 2400 baud. This might be necessary if you encounter a lot of
transmission errors on your serial connection.
/T:???? = read Timeout in seconds Default=120
Set the number of seconds that the program is willing to wait for
buffer space to free up in the plotter. You may need to increase
this beyond the default of 2 minutes (120 seconds) if you set the
pen speeds very low in AutoCAD (see ADI7221 for information on
configuring AutoCAD).
Please note that lower baud rates do not necessitate longer timeout
settings. The timeout only applies to the period of time between
sending packets.
An example of a more complex invocation of the program might be:
SEND7221 /C:2 /B:1200 /T:240 infile.hpp
This would send infile.hpp out COM2, at 1200 baud, allowing 4 minutes
(240 seconds) for the buffer to clear between packets.
Since the ADI7221 and SEND7221 programs will usually be run in sequence,
a batch file, PLOT7221, has been included in the distribution. The
command line for this batch file consists of the following:
PLOT7221 plotname
The plotname parameter should not include a file extension. PLOT7221
looks for a file named plotname.PLT, and attempts to convert it to a
file named plotname.HPP via the ADI7221 program. If the ADI7221 program
completes successfully, SEND7221 is then called to send plotname.HPP to
the plotter.
Command line options for the SEND7221 program can be included on the
PLOT7221 command line. These options MUST follow the plotname
parameter. The complete synopsis for the PLOT7221 batch command is as
follows:
PLOT7221 plotname [SEND7221 options]
--------------------------ERROR AND WARNING MESSAGES-------------------------
Error: Invalid option: ???
You specified a command line option that SEND7221 could not decode
Retype the SEND7221 command.
Error: Invalid com port: ???
The com port you specified with the /C option is not within the range of
1 - 4.
Retype the SEND7221 command.
Error: Invalid baud: ???
The baud rate you specified with the /B option was not one of 300, 1200,
or 2400.
Retype the SEND7221 command.
Error: Invalid data bits: ???
The number of data bits you specified with the /D option was not one of
7, 8, or D.
Retype the SEND7221 command.
Error: Invalid stop bits: ???
The number of stop bits you specified with the /S option was not one of
1 or 2.
Retype the SEND7221 command.
Error: Invalid parity: ???
The parity you specified with the /P option was not one of E, O, N, or D.
Retype the SEND7221 command.
Error: Too many input files.
You specified more than one input file to be processed by SEND7221.
Retype the SEND7221 command.
Error: Input file not specified.
You failed to include the name of the input file in the command line.
Retype the SEND7221 command.
Error: can't allocate input buffer.
There is not enough memory to run the program. You either have a PC with
a very low amount of memory, or you have too many programs running in a
multitasking environment.
If you are in a multitasking environment like Windows, try closing some
applications and rerunning the SEND7221 command.
Error: can't open input file for reading.
SEND7221 could not find the input file, or there was an I/O error on the
disk.
Check the spelling of the input file's name. If it is correct, run the
MS-DOS CHKDSK command to see if there is a problem with the disk.
Error: I/O error reading input file.
SEND7221 encountered an I/O error on the input file after it had been
opened successfully. This probably indicates a problem with the disk.
Run the MS-DOS CHKDSK program to determine if there is a problem with the
disk.
Error: I/O error closing input file.
SEND7221 encountered an I/O error on the input file after it had been
opened and read successfully. This probably indicates a problem with the
disk.
Run the MS-DOS CHKDSK program to determine if there is a problem with the
disk.
Error: I/O error sending init string to plotter.
This error indicates that the very first attempt to send information to
the plotter has failed. It is likely that the plotter is turned off, or
is configured incorrectly.
Make sure the plotter is turned on, and that it is on-line (the online
button is lit).
Check the serial cable. It should be a NULL modem cable, and should be
securely connected to COM1 (or the port you specified on the command line).
Check to ensure that the baud rate and parity settings on the plotter are
the same as those used by SEND7221 (see the USAGE section for details).
Error: I/O error sending data to plotter.
This error indicates that something has gone wrong with the second or
subsequent attempt to communicate with the plotter (ie the init string
seemed to go through correctly, but a later attempt to send data failed).
Check the plotter to ensure that it has not been powered off or put in
local or standby modes.
Check the serial cable to ensure that it is still connected securely.
If the file you are sending was not created by ADI7221, it is possible that
it contains device control instructions that caused SEND7221 to fail. You
will not be able to plot this file with SEND7221.
If the plotter was able to receive some of the data (ie it started to
produce a plot), try increasing the timeout period (the /T option). If
you set the pen speeds to one of the lower settings (or just left them at
the defaults that AutoCAD supplies) the buffer may not be clearing within
the 2 minute (120 second) timeout period.
If the plotter did not begin to produce a plot, procede as if this were
the "I/O error sending init string" message.
Error: I/O error sending HP_END command to plotter.
This error indicates that something has gone wrong with the connection
after several successful communications.
Check the plotter to ensure that it has not been powered off or put in
local or standby modes.
Check the serial cable to ensure that it is still connected securely.
If the file you are sending was not created by ADI7221, it is possible that
it contains device control instructions that caused SEND7221 to fail. You
will not be able to plot this file with SEND7221.
Increasing the timeout period will have no affect on this error. The
timeout applies only to sending graphics commands; END_PLOT is a device
control command.
-----------------------------PLOTTER ERROR LIGHTS----------------------------
Error light on solid:
The plotter detected a parity error during transmission.
Check to ensure that the parity enabled/disabled and even/odd settings on
the plotter match those used with the SEND7221 command.
If the parity settings are correct, make sure the serial cable is connected
securely, that it is a NULL modem cable, and that the connector ends are
clean.
If everything else seems ok, try lowering the baud rate. A lower baud rate
may reduce the chance of an I/O error.
Error light blinking:
The plotter detected an error in one of the 7221 command codes.
If the file you are attempting to send was not created with the ADI7221
program, you will not be able to use SEND7221 to plot that file.
You may have configured AutoCAD incorrectly. Specifically, you may have
specified more speeds or more pens than your plotter supports.
Make sure you configured AutoCAD in accordance with the instructions in
the AutoCAD Setup section of ADI7221.DOC.
Otherwise, check the cables, connectors, and command line switches as for
other types of plotter I/O errors.
If everything seems to be correct, you may have encountered a bug in either
ADI7221 or SEND7221.
Out of Limit light on solid:
The plotter has detected an attempt to move the pen beyond the plotting
boundaries.
If you select EXTENTS or LIMITS when asked by AutoCAD for the part of the
drawing you wished to plot, those dimensions may be too large for the
plotter. Make sure that you have not attempted to create a drawing that
was larger than 15.2 x 10.0 inches.
You may also need to check the configuration options that were specified
in AutoCAD prior to producing the plot. Make sure that you configured
AutoCAD in accordance with the instructions in the AutoCAD Setup section
of ADI7221.DOC.
If everything seems to be ok, you may have encountered a bug in either
ADI7221 or SEND7221.
------------------------------------BUGS-------------------------------------
SEND7221 doesn't check the status of the plotter (ie are there any pens
in the pen bays) before sending data. This is theoretically possible,
but I didn't put it in. I might add it to a later version.
It is possible to ask the plotter what type of error has caused the Error
light to begin flashing, but I haven't provided you with a way to do it.
You can do this by hand if you have a program that allows you to
communicate directly through the serial port. Check the HP manual for
the device control command for reporting errors.
Error and Warning messages should probably have been given numbers so
they would be easier to find in this manual. There are only about 15
possible errors, so it shouldn't be too big of a deal.